/**
 * 
 */
package com.roc.util.constant;

import java.util.Map;

import org.apache.commons.lang3.StringUtils;

/**
 * @author RenPengFei
 * 2013-5-25 下午4:08:18
 */
public enum TransType {
	TRANS_TYPE_100031("100031","信用卡还款(刷卡)--实时还款"),
	TRANS_TYPE_100032("100032","信用卡还款(刷卡)--非实时还款"),
	TRANS_TYPE_100040("100040","个贷还款(刷卡)"),
	TRANS_TYPE_200003("200003","福彩购买(刷卡)"),
	TRANS_TYPE_100038("100038","转账(普通)"),
	TRANS_TYPE_100025("100025","支付宝充值(刷卡)"),
	TRANS_TYPE_100034("100034","信用支付B"),
	TRANS_TYPE_100022("100022","手机充值(刷卡)"),
	TRANS_TYPE_100037("100037","转账(快速)"),
	TRANS_TYPE_100061("100061","公共事业缴费"),
	TRANS_TYPE_100071("100071","商旅助手"),
	TRANS_TYPE_100091("100091","商品购物"),
	TRANS_TYPE_100084("100084","火车票支付(刷卡)"),
	TRANS_TYPE_100035("100035","信用支付A"),
	TRANS_TYPE_200004("200004","提现(快速)"),
	TRANS_TYPE_200005("200005","提现(普通)"),
	TRANS_TYPE_200006("200006","提现(快速周未)");
	
	//5	100038	转账(普通)
	//6	100025	支付宝充值(刷卡)
	//7	100034	我要付款(刷卡)--超级付款  信用支付B
	//8	100022	手机充值(刷卡)
	//9	100037	转账(快速)
	//10	100061	公共事业缴费 
	//11	100071	商旅助手
	//12	100091	商品购物
	//13	100084	火车票支付(刷卡)
	//14	100035	我要付款(刷卡)--普通付款  信用支付A

	private String code;
	private String name;
	
	private TransType(String code,String name){
		this.code=code;
		this.name=name;
	}
	
	public static TransType valueOfCode(String code) {
		if (StringUtils.isBlank(code)) {
			throw new IllegalArgumentException("Merchant Status " + code
					+ " is blank");
		}
		for (TransType mt : values()) {
			if (mt.getCode().equals(code)) {
				return mt;
			}
		}
		throw new IllegalArgumentException("Merchant Type " + code
				+ " is not exist");
	}
	
	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}
	
	
	
}
